<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <%--<title>报关订单</title>--%>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
  <link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
  <link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
  <link rel="stylesheet" href="online/template/ledefault/css/app.css">

  <link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
  <link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
  <script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
  <script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
  <script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
  <script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
  <script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
  <script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
  <script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
  <script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
  <script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
  <script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
  <script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
  <script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
  <script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
  <script type="text/javascript"  charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
  <script type="text/javascript"  charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>

</head>


 <script type="text/javascript">
     function Myenter(str) {
         if (event.keyCode == 13) {
             str.focus();
         }
     }
 $(document).ready(function(){
	 init();
	 $("#jform_tab .con-wrapper").hide(); //Hide all tab content  
	 $("#jform_tab li:first").addClass("active").show(); //Activate first tab  
	 $("#jform_tab .con-wrapper:first").show(); //Show first tab content
	 
	 
	 //On Click Event  
    $("#jform_tab li").click(function() {  
        $("#jform_tab li").removeClass("active"); //Remove any "active" class  
        $(this).addClass("active"); //Add "active" class to selected tab  
        $("#jform_tab .con-wrapper").hide(); //Hide all tab content  
        var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content  
        $(activeTab).fadeIn(); //Fade in the active content
        //$(""+activeTab).show();   
        if( $(activeTab).html()!="") {
        	return false;
        }else{
        	$(activeTab).html('正在加载内容，请稍后...');
        	var url = $(this).attr("tab-ajax-url");
        	$.post(url, {}, function(data) {
        		 //$(this).attr("tab-ajax-cached", true);
        		$(activeTab).html(data);
        		
            });
        }  
        return false;  
    });  
  });
  //初始化下标
	function resetTrNum(tableId) {
		$tbody = $("#"+tableId+"");
		$tbody.find('>tr').each(function(i){
			$(':input, select', this).each(function(){
				var $this = $(this), name = $this.attr('name'), val = $this.val();
				if(name!=null){
					if (name.indexOf("#index#") >= 0){
						$this.attr("name",name.replace('#index#',i));
					}else{
						var s = name.indexOf("[");
						var e = name.indexOf("]");
						var new_name = name.substring(s+1,e);
						$this.attr("name",name.replace(new_name,i));
					}
				}
			});
			$(this).find('div[name=\'xh\']').html(i+1);
		});
	}
	
	function init(){
    	var tabHead =$("#jform_tab li:first");
    	var tabBox = $("#jform_tab .con-wrapper:first"); 
    	var url = tabHead.attr("tab-ajax-url");
    	tabBox.html('正在加载内容，请稍后...');
    	$.post(url, {}, function(data) {
            tabBox.html(data);
    		//tabHead.attr("tab-ajax-cached", true);
        });
    }
 </script>
 <body>
  <form id="formobj" action="hgOrdrController.do?doUpdate" name="formobj" method="post">

			<input type="hidden" id="btn_sub" class="btn_sub"/>
			<input type="hidden" name="id" value='${hgOrdrPage.id}' >

	  <input id="createName" name="createName"  value='${hgOrdrPage.createName}' type="hidden">
	  <input id="createBy" name="createBy"  value='${hgOrdrPage.createBy}' type="hidden">
	  <input id="createDate" name="createDate" value='${hgOrdrPage.createDate}'  type="hidden">
	  <input id="updateName" name="updateName" value='${hgOrdrPage.updateName}'  type="hidden">
	  <input id="updateBy" name="updateBy" value='${hgOrdrPage.updateBy}'  type="hidden">
	  <input id="updateDate" name="updateDate" value='${hgOrdrPage.updateDate}'  type="hidden">
	  <%--<input id="sysOrgCode" name="sysOrgCode" value='${hgOrdrPage.sysOrgCode}'  type="hidden">--%>
	  <input id="sysCompanyCode" name="sysCompanyCode" value='${hgOrdrPage.sysCompanyCode}' type="hidden">
	  <input id="bpmStatus" name="bpmStatus" value='${hgOrdrPage.bpmStatus}' type="hidden">


	  <div class="tab-wrapper">
			    <!-- tab -->
			    <ul class="nav nav-tabs">
			      <li role="presentation" class="active"><a href="javascript:void(0);">${hgOrdrPage.docstatus}</a>  </li>
			    </ul>

			    <!-- tab内容 -->
			    <div class="con-wrapper" style="display: block;">

					<%------line1---%>
						<%--1--%>
						<%--1--%>
						<div class="row show-grid">
							<%--发票号--%>
							<div class="col-xs-1 text-center">
								<b style="color: red">进仓号：</b>
							</div>
							<div class="col-xs-3">
								<input id="invcode" tabindex="1"  onKeyPress="Myenter(cardname)" name="invcode" type="text" class="form-control" required="required" datatype="*" value='${hgOrdrPage.invcode}'   ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x5"/></label>
							</div>

							<%--截放行时间--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x26"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="duedate" tabindex="21" onKeyPress="Myenter(plandtime)" name="duedate" type="text"  ignore="ignore"  style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;"  class="form-control" value='${hgOrdrPage.duedate}'  onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"   />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x26"/></label>
							</div>
							<%--目的港--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x14"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="pod" name="pod" type="text" tabindex="31" onKeyPress="Myenter(shiping)"  class="form-control"  value='${hgOrdrPage.pod}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x14"/></label>
							</div>
						</div>

						<div class="row show-grid">
							<%--new发票号filename4--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x60"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="filename4" name="filename4" tabindex="2" onKeyPress="Myenter(cardname)"   type="text" class="form-control" value='${hgOrdrPage.filename4}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x60"/></label>
							</div>

							<%--预计进仓时间--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x13"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="plandtime" tabindex="22"   name="plandtime" onKeyPress="Myenter(ys)"  type="text"  ignore="ignore"  style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;"  class="form-control" value='${hgOrdrPage.plandtime}'  onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"   />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x13"/></label>
							</div>
							<%--ETD--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x33"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="etdate"     name="etdate" type="text"  onKeyPress="Myenter(pod)"    ignore="ignore"  style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;"  class="form-control" value='${hgOrdrPage.etdate}'  onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"   />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x33"/></label>
							</div>



						</div>

						<%--2--%>
						<div class="row show-grid">
							<%--客户名称
                            <div class="col-xs-1 text-center">
                                <b><t:mutiLang langKey="hg.x4"/>：</b>
                            </div>
                            <div class="col-xs-3">
                                <input id="cardname" name="cardname" tabindex="3" onKeyPress="Myenter(cardcode)"   type="text" class="form-control" value='${hgOrdrPage.cardname}'  ignore="ignore"  />
                                <span class="Validform_checktip" style="float:left;height:0px;"></span>
                                <label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x4"/></label>
                            </div>
                            --%>
							<%--发货单位--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x6"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="cardcode" name="cardcode" tabindex="4" onKeyPress="Myenter(js)"  type="text" class="form-control" value='${hgOrdrPage.cardcode}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x6"/></label>
							</div>


							<%--船名--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x15"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="shiping" name="shiping" tabindex="32" onKeyPress="Myenter(tranType)"  type="text" class="form-control" value='${hgOrdrPage.shiping}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x15"/></label>
							</div>

							<%--运输方式--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x16"/>：</b>
							</div>
							<div class="col-xs-3">
								<t:dictSelect field="tranType"      type="list" extendJson="{class:'form-control',style:'width:150px'}" 		defaultVal="海运"    dictTable="t_hg_ystype" dictField="ystype" dictText="ystype"  hasLabel="false"      ></t:dictSelect>

								<%--<input id="tranType" name="tranType" tabindex="33" type="text" class="form-control" value='${hgOrdrPage.tranType}'  ignore="ignore"  />--%>
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x16"/></label>
							</div>


						</div>

						<div class="row show-grid">

							<%--包装件数--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x7"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="js" name="js" type="text" tabindex="5" onKeyPress="Myenter(mtou)"   class="form-control"   value='${hgOrdrPage.js}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x7"/></label>
							</div>

							<%--查验费--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x22"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="cyfy" name="cyfy"  onKeyPress="Myenter(gdfy)"   type="text" class="form-control"  datatype="/^(-?\d+)(\.\d+)?$/" value='${hgOrdrPage.cyfy}'   ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x22"/></label>
							</div>

							<%--进出口类型--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x17"/>：</b>
							</div>
							<div class="col-xs-3">
								<t:dictSelect field="eiType"   type="list" extendJson="{class:'form-control',style:'width:150px'}" 	defaultVal="出口"  dictTable="t_hg_type" dictField="trtype" dictText="trtype"  hasLabel="false"      ></t:dictSelect>

								<%--<input id="eiType" name="eiType" tabindex="34" type="text" class="form-control" value='${hgOrdrPage.eiType}'   ignore="ignore"  />--%>
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x17"/></label>
							</div>

						</div>
						<%--5--%>
						<div class="row show-grid">

							<%--码头/仓库--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x8"/>：</b>
							</div>
							<div class="col-xs-3">
								<t:dictSelect id="mtou" field="mtou"   type="list" extendJson="{class:'form-control',style:'width:150px'}"    dictTable="t_hg_mtou" dictField="mtname" dictText="mtname"  hasLabel="false" defaultVal='${hgOrdrPage.mtou}'   title="报关港口 "></t:dictSelect>
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x8"/> </label>
							</div>

							<%--改单费--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x23"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="gdfy" name="gdfy" tabindex="25" onKeyPress="Myenter(hzfy)"  type="text" class="form-control"  datatype="/^(-?\d+)(\.\d+)?$/" value='${hgOrdrPage.gdfy}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x23"/></label>
							</div>
							<%--装货港--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x30"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="pol" name="pol"  onKeyPress="Myenter(duedate)"  type="text"  class="form-control"  value='${hgOrdrPage.pol}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x30"/></label>
							</div>


						</div>

						<div class="row show-grid">

							<%--提单单号--%>
							<div class="col-xs-1 text-center">
								<b>提单号：</b>
							</div>
							<div class="col-xs-3">
								<input id="tdcode" name="tdcode" tabindex="6" onKeyPress="Myenter(fxdonum)"   type="text" class="form-control" value='${hgOrdrPage.tdcode}'   ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x9"/></label>
							</div>
							<%--换載费--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x24"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="hzfy" name="hzfy" tabindex="26" onKeyPress="Myenter(doctotal)"  type="text" class="form-control"  datatype="/^(-?\d+)(\.\d+)?$/" value='${hgOrdrPage.hzfy}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x24"/></label>
							</div>
								<%--商品--%>
								<div class="col-xs-1 text-center">
									<b><t:mutiLang langKey="hg.x31"/>：</b>
								</div>
								<div class="col-xs-3">
									<input id="hsname" name="hsname" type="text"  class="form-control"  value='${hgOrdrPage.hsname}'  ignore="ignore"  />
									<span class="Validform_checktip" style="float:left;height:0px;"></span>
									<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x31"/></label>
								</div>

						</div>




						<%--6--%>
						<div class="row show-grid">

							<%--报关单号--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x11"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="fxdonum" name="fxdonum" tabindex="7"   onKeyPress="Myenter(docstatus)"  type="text" class="form-control"  value='${hgOrdrPage.fxdonum}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x11"/></label>
							</div>
							<%--其他费用--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x25"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="doctotal" name="doctotal" onKeyPress="Myenter(comment)"   tabindex="27" type="text" class="form-control" value='${hgOrdrPage.doctotal}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x25"/></label>
							</div>
							<%--报关页数--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x19"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="ys" name="ys" tabindex="23" onKeyPress="Myenter(cyfy)"  type="text" class="form-control"  datatype="n" value='${hgOrdrPage.ys}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x19"/></label>
							</div>

						</div>
						<%--<div class="row show-grid">--%>
						<%--<div class="col-xs-12 text-center">--%>
						<%--<b style="font-size: large"><t:mutiLang langKey="hg.c1"/></b>--%>
						<%--</div>--%>
						<%--</div>--%>

						<%--7
						<div class="row show-grid">


							 -商品--
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x31"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="hsname" name="hsname" type="text"  class="form-control"  value='${hgOrdrPage.hsname}'  ignore="ignore"  />
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x31"/></label>
							</div>
						</div>
		                 --%>
						<div class="row show-grid">
							<%--报关进度--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x27"/>：</b>
							</div>
							<div class="col-xs-3">
								<%--<t:dictSelect field="docstatus"   type="list" extendJson="{class:'form-control',style:'width:150px'}" 		datatype="*"  dictTable="t_hg_ordtype" dictField="ordtype" dictText="ordtype"  hasLabel="false" defaultVal='${hgOrdrPage.docstatus}'   title="单据进度"></t:dictSelect>--%>
								<t:dictSelect id="docstatus" field="docstatus"     type="list" extendJson="{class:'form-control',style:'width:150px'}" 		datatype="*"  dictTable="t_hg_ordtype" dictField="ordtype" dictText="ordtype"  hasLabel="false" defaultVal='未接单'   title="单据进度"></t:dictSelect>

								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x27"/></label>
							</div>


							<%--备注--%>
							<div class="col-xs-1 text-center">
								<b><t:mutiLang langKey="hg.x12"/>：</b>
							</div>
							<div class="col-xs-3">
								<input id="comment" style="width:650px" class="form-control" onKeyPress="Myenter(etdate)"  tabindex="28" width="100%"  ignore="ignore" value='${hgOrdrPage.comment}'   name="comment"></input>
								<span class="Validform_checktip" style="float:left;height:0px;"></span>
								<label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.x12"/></label>
							</div>

						</div>


			<%--		<div class="row show-grid">
						<%--附件--%>
						<%--			<div class="col-xs-1 text-center">
                                        <b><t:mutiLang langKey="hg.f1"/>：</b>
                                    </div>
                                        <div class="col-xs-2">

                                        <t:webUploader   name="filename0" bizType="photosucai" auto="true" extensions="doc,txt,jpg,*" buttonStyle="btn-green btn-S" fileNumLimit="15" pathValues="${hgOrdrPage.filename0}" ></t:webUploader>
                                            <span class="Validform_checktip" style="float:left;height:0px;"></span>
                                            <label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.f1"/></label>

                                        </div>

                                        <%--附件上传时间--%>
						<%--		<div class="col-xs-1 text-center">
                                    <b><t:mutiLang langKey="hg.f2"/>：</b>
                                </div>
                                <div class="col-xs-2">

                                    <input id="filetype0" name="filetype0" type="text"  class="form-control"  value='${hgOrdrPage.filetype0}'  ignore="ignore"  />
                                    <span class="Validform_checktip" style="float:left;height:0px;"></span>
                                    <label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.f2"/></label>

                                </div>

                                <%--附件是否更新--%>
						<%--			<div class="col-xs-1 text-center">
                                        <b><t:mutiLang langKey="hg.f3"/>：</b>
                                    </div>
                                    <div class="col-xs-2">
                                        <t:dictSelect field="filetype1" type="radio" typeGroupCode="sf_yn" hasLabel="false" title="是否" defaultVal='${hgOrdrPage.filetype1}' ></t:dictSelect>


                                        <%--<input id="filetype1" name="filetype1" type="text"  class="form-control"  value='${hgOrdrPage.filetype0}'  ignore="ignore"  />--%>
						<%--					<span class="Validform_checktip" style="float:left;height:0px;"></span>
                                            <label class="Validform_label" style="display: none"><t:mutiLang langKey="hg.f3"/></label>

                                        </div>
                                </div>--%>


				</div>
			   
			   <div class="con-wrapper" style="display: block;"></div>
	</div>
		
			
			
<script type="text/javascript">
   $(function(){
    //查看模式情况下,删除和上传附件功能禁止使用
	if(location.href.indexOf("load=detail")!=-1){
		$(".jeecgDetail").hide();
	}
	
	if(location.href.indexOf("mode=read")!=-1){
		//查看模式控件禁用
		$("#formobj").find(":input").attr("disabled","disabled");
	}
	if(location.href.indexOf("mode=onbutton")!=-1){
		//其他模式显示提交按钮
		$("#sub_tr").show();
	}
   });

  var neibuClickFlag = false;
  function neibuClick() {
	  neibuClickFlag = true;
	  $('#btn_sub').trigger('click');
  }
</script>

<div id="jform_tab" class="tab-wrapper">
	<!-- tab -->
    <ul class="nav nav-tabs">
		    	<%--<li role="presentation" tab-ajax-url="hgOrdrController.do?hgRdr1List&id=${hgOrdrPage.id}"><a href="#con-wrapper0"><t:mutiLang langKey="hg.l1"/></a></li>--%>
		    	<li role="presentation" tab-ajax-url="hgOrdrController.do?hgRdr2List&id=${hgOrdrPage.id}"><a href="#con-wrapper1"><t:mutiLang langKey="hg.l2"/></a></li>
		    	<li role="presentation" tab-ajax-url="hgOrdrController.do?hgRdr3List&id=${hgOrdrPage.id}"><a href="#con-wrapper2"><t:mutiLang langKey="hg.l3"/></a></li>
    </ul>
    
	     <div class="con-wrapper" id="con-wrapper0" style="display: none;"></div>
	     <div class="con-wrapper" id="con-wrapper1" style="display: none;"></div>
	     <div class="con-wrapper" id="con-wrapper2" style="display: none;"></div>
</div>


			
		<div align="center"  id = "sub_tr" style="display: none;" > <input type="button" value="提交" onclick="neibuClick();" class="ui_state_highlight"></div>
		<script src="plug-in/layer/layer.js"></script>
		<script type="text/javascript">
		$(function() {
			$("#formobj").Validform({
				tiptype: function(msg, o, cssctl) {
		            if (o.type == 3) {
		                layer.open({
		                    title: '提示信息',
		                    content: msg,
		                    icon: 5,
		                    shift: 6,
		                    btn: false,
		                    shade:false,time:5000,
		                    cancel: function(index) {
		                        o.obj.focus();
		                        layer.close(index);
		                    },
		                    yes: function(index) {
		                        o.obj.focus();
		                        layer.close(index);
		                    },
		                })
		            }
		        },
				btnSubmit: "#btn_sub",
				btnReset: "#btn_reset",
				ajaxPost: true,
				beforeSubmit: function(curform) {
					var tag = true;
					//提交前处理

					return tag;
				},
				usePlugin: {
					passwordstrength: {
						minLen: 6,
						maxLen: 18,
						trigger: function(obj, error) {
							if (error) {
								obj.parent().next().find(".Validform_checktip").show();
								obj.find(".passwordStrength").hide();
							} else {
								$(".passwordStrength").show();
								obj.parent().next().find(".Validform_checktip").hide();
							}
						}
					}
				},
				callback: function(data) {
						if (data.success == true) {
							 var win = frameElement.api.opener;
							 win.reloadTable();
							 win.tip(data.msg);
							 frameElement.api.close();
						} else {
							if (data.responseText == '' || data.responseText == undefined) {
								$.messager.alert('错误', data.msg);
								$.Hidemsg();
							} else {
								try {
									var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
									$.messager.alert('错误', emsg);
									$.Hidemsg();
								} catch(ex) {
									$.messager.alert('错误', data.responseText + '');
								}
							}
							return false;
						}
				}
			});
		});
		</script>


		</form>
		<!-- 添加 产品明细 模版 -->
		<table style="display:none">
			<tbody id="add_hgRdr1_table_template">
				<tr>
					 <th scope="row"><div name="xh"></div></th>
					 <td><input style="width:20px;" type="checkbox" name="ck"/></td>
						  <td align="left">
								  	<input name="hgRdr1List[#index#].itemname" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore" />
							  <label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.l4"/></label>
						  </td>
						  <td align="left">
								  	<input name="hgRdr1List[#index#].quantity" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore" />
							  <label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.l5"/></label>
						  </td>
						  <td align="left">
								  	<input name="hgRdr1List[#index#].hscode" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore" />
							  <label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.l5"/></label>
						  </td>
					</tr>
				 </tbody>
			<tbody id="add_hgRdr2_table_template">
			<tr>
				<th scope="row"><div name="xh"></div></th>
				<td><input style="width:20px;" type="checkbox" name="ck"/></td>
				<td align="left">
					<input name="hgRdr2List[#index#].by1" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore"   />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.by21"/></label>
				</td>
				<td align="left">
					<input type="hidden" id="hgRdr2List[#index#].filetype" name="hgRdr2List[#index#].filetype" />
					<input class="btn btn-sm btn-success" style="margin-left:10px;" type="button" value="上传附件"
						   onclick="commonUpload(commonUploadDefaultCallBack,'hgRdr2List\\[#index#\\]\\.filetype','hgRdr2List\\[#index#\\]\\.filename')"/>
					<a  target="_blank" id="hgRdr2List[#index#].filetype_href"></a>
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x28"/></label>
				</td>
				<td align="left">
					<input id="hgRdr2List[#index#].filename" name="hgRdr2List[#index#].filename" maxlength="32"  ignore="ignore"  type="text" class="form-control"  style="width:120px;" />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x29"/></label>
				</td>
			</tr>
			</tbody>
			<tbody id="add_hgRdr3_table_template">
			<tr>
				<th scope="row"><div name="xh"></div></th>
				<td><input style="width:20px;" type="checkbox" name="ck"/></td>
				<td align="left">
					<input type="hidden" id="hgRdr3List[#index#].filename" name="hgRdr3List[#index#].filename" />
					<input class="btn btn-sm btn-success" style="margin-left:10px;" type="button" value="上传附件"
						   onclick="commonUpload(commonUploadDefaultCallBack,'hgRdr3List\\[#index#\\]\\.filename','hgRdr3List\\[#index#\\]\\.fname')"/>
					<a  target="_blank" id="hgRdr3List[#index#].filename_href"></a>
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x38"/></label>
				</td>
				<td>
					<input id="hgRdr3List[#index#].fname" name="hgRdr3List[#index#].fname" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore" />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x39"/></label>
				</td>
				<td>
					<input name="hgRdr3List[#index#].by1" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore" />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x40"/></label>
				</td>
				<td>
					<input name="hgRdr3List[#index#].by2" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore" />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x41"/></label>
				</td>
				<td align="left">
					<input name="hgRdr3List[#index#].by3" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore"   />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x42"/></label>
				</td>
				<td align="left">
					<input name="hgRdr3List[#index#].by4" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore"  />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x43"/></label>
				</td>
				<td align="left">
					<input name="hgRdr3List[#index#].by5" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore"   />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x44"/></label>
				</td>
				<td align="left">
					<input name="hgRdr3List[#index#].by6" maxlength="32" type="text" class="form-control"  style="width:120px;"  ignore="ignore"   />
					<label class="Validform_label" style="display: none;"><t:mutiLang langKey="hg.x45"/></label>
				</td>
			</tr>
			</tbody>
		</table>
	<script src = "webpage/com/yserp/hg/hgOrdr.js"></script>
 </body>
 </html>